package com.nopay.cdxphone.dialog;

import android.app.Dialog;
import android.os.Bundle;
import android.view.View;

import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;

import com.nopay.cdxphone.R;


/**
 * 本周统计
 */
public class DialogWeekStatics extends Dialog {

    private AppCompatActivity mActivity;

    public DialogWeekStatics(@NonNull AppCompatActivity context) {
        super(context, R.style.MyDialog);
        mActivity = context;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.dialog_week_statics);
        //按空白处不能取消动画
        setCanceledOnTouchOutside(true);
        findViewById(R.id.tv1).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickEvent(1);
                dismiss();
            }
        });
        findViewById(R.id.tv2).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickEvent(2);
                dismiss();
            }
        });

        findViewById(R.id.tv3).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickEvent(3);
                dismiss();
            }
        });

        findViewById(R.id.tv4).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickEvent(4);
                dismiss();
            }
        });

        findViewById(R.id.tv5).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                onClickEvent(5);
                dismiss();
            }
        });
    }

    public void onClickEvent(int position) {

    }

}



